package com.test.common.repository.perf;

import com.test.common.entity.perf.PerfTaskScriptEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface PerfTaskScriptRepository extends JpaRepository<PerfTaskScriptEntity, Integer> {

    Optional<PerfTaskScriptEntity> findByTaskIdAndScriptId(int taskId, int scriptId);

    void deleteByTaskIdAndScriptId(int taskId, int scriptId);

    List<PerfTaskScriptEntity> findAllByTaskId(int taskId);
}
